package 酒店管理系统模拟.test02;

public class Room {
    private int no;
    private String type;
    private boolean status;
    public Room(int no, String type, boolean status) {
        this.no = no;
        this.type = type;
        this.status = status;
    }

    public Room() {
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public boolean equals(Object obj) {
        if(obj == null || !(obj instanceof Room))return false;
        if(this == obj)return true;
        Room room = (Room)obj;
        return this.no == room.getNo();
    }

    public String toString() {
        return "[" + no + "," + type + "," + (status ? "空闲" : "占用") + "]";
    }
}
